package edu.scut.course_management.po;

/**
 * 持久化对象：院系
 * @author thompson
 */
public class Department {
    private Integer departmentId;
    private String departmentName;

    public Integer getDepartmentId() {
        return departmentId;
    }

    public void setDepartmentId(Integer departmentId) {
        this.departmentId = departmentId;
    }

    public String getDepartmentName() {
        return departmentName;
    }

    public void setDepartmentName(String departmentName) {
        this.departmentName = departmentName;
    }

    @Override
    public String toString() {
        return "Department {" + 
               "departmentId=" + departmentId + 
               ", departmentName=" + departmentName + 
               "]";
    }

    @Override
    public boolean equals(Object obj){
        if(!(obj instanceof Department)){
            return false;
        }
        else{
            return departmentId.equals(((Department)obj).getDepartmentId())&&
                   departmentName.equals(((Department)obj).getDepartmentName());
        }
    }
}
